/*
 * @Author: niuxb 951259738@qq.com
 * @Date: 2022-06-07 09:36:04
 * @LastEditors: niuxb 951259738@qq.com
 * @LastEditTime: 2022-06-24 14:46:44
 * @FilePath: /syq/src/router/index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/views/layout/Layout';

Vue.use(Router)
export const constantRouterMap = [{
    path: '/login',
    name: 'login',
    component: () =>
      import('@/views/login/Login'),
    meta: {
      title: '登录',
      icon: 'login'
    },
    hidden: true
  },
  {
    path: '',
    redirect: '/tabview'
  },
  {
    path: '/home',
    name: 'home',
    meta: {
      title: '首页'
    },
    component: () =>
      import('@/views/home'),
  },
  // 设置
  {
    path: '/set',
    name: 'set',
    component: () =>
      import('@/views/set'),
  },
  // 新待办
  {
    path: '/newtodo',
    component: Layout,
    children: [{
      meta: {
        title: '我的待办'
      },
      name: 'newtodo',
      path: '',
      component: () => import('@/views/newtodo')
    }]
  },
  // 详情
  {
    path: '/newDetail',
    component: Layout,
    children: [{
      meta: {
        title: '详情'
      },
      name: 'newDetail',
      path: '',
      component: () => import('@/views/newDetail')
    }]
  },
  {
    path: '/processnext',
    component: Layout,
    children: [{
      meta: {
        title: '递交'
      },
      name: 'processnext',
      path: '',
      component: () =>
        import('@/components/ProcessNext'),
    }]

  },
  {
    path: '/getOrgAndUser',
    component: Layout,
    children: [{
      meta: {
        title: '政策宣讲'
      },
      name: 'getOrgAndUser',
      path: '',
      component: () =>
        import('@/components/GetOrgAndUser'),
    }]

  },{
    path:'/mainview',
    name: 'mainview',
    component:()=>
    import('@/views/mainview')
  },{  //tab页
    path:'/tabview',
    name: 'tabview',
    component:()=>
    import('@/views/tabview')

  },{
    path: '/zcxj/zcxjdraw',
    component: Layout,
    children: [{
      meta: {
        title: '政策宣讲下达-起草'
      },
      name: 'zcxjdraw',
      path: '',
      component: () => import('@/views/zcxj/zcxjdraw')
    }]
  },{
    path: '/zcxj/zcxjfromdetail',
    component: Layout,
    children: [{
      meta: {
        title: '政策宣讲清单'
      },
      name: 'zcxjfromdetail',
      path: '',
      component: () => import('@/views/zcxj/zcxjfromdetail')
    }]
  },{
    path: '/zcxj/zcxjdetail',
    component: Layout,
    children: [{
      meta: {
        title: '政策宣讲详情'
      },
      name: 'zcxjdetail',
      path: '',
      component: () => import('@/views/zcxj/zcxjdetail')
    }]
  },{
    path: '/success',
    component: Layout,
    children: [{
      meta: {
        title: '提示'
      },
      name: 'success',
      path: '',
      component: () => import('@/views/success')
    }]
  },{
    path: '/zcxjtosubmit',
    component: Layout,
    children: [{
      meta: {
        title: '政策宣讲递交'
      },
      name: 'zcxjtosubmit',
      path: '',
      component: () =>
        import('@/components/zcxjtosubmit'),
    }]

  },{
    path: '/szjsdetail',
    component:Layout,
    children:[
      {
        meta:{
          title:'思政纪实详情'
        },
        name:'szjsdetail',
        path:'',
        component:()=>
        import('@/views/szjs/szjsdetail'),
      }
    ]
  },{
    path: '/test',
    component:Layout,
    children:[
      {
        meta:{
          title:'test'
        },
        name:'test',
        path:'',
        component:()=>
        import('@/views/test'),
      }
    ]
  },{
    path:'/szjs/szjssetlist',
    component:Layout,
    children:[
      {
        meta:{
          title:'思政纪实配置',
          icon: 'add-o',
          layoutName:'szjssetlist',
        },
        name:'szjssetlist',
        path:'',
        component:()=>
          import('@/views/szjs/szjssetlist')
        
      }
    ]
  },{
    path:'/szjs/szjssetcreate',
    component:Layout,
    children:[
      {
        meta:{
          title:'思政纪实-新增',
          layoutName:'szjssetcreate',
        },
        name:'szjssetcreate',
        path:'',
        component:()=>
        import('@/views/szjs/szjssetcreate')
      },
    ],
  },{
    path:'/choseuser',
    component:Layout,
    children:[
      {
        meta:{
          title:'选择候选人',
          layoutName:'choseuser',
        },
        name:'choseuser',
        path:'',
        component:()=>
        import('@/views/choseuser')
      },
    ],
  },{
    path:'/choseuser2',
    component:Layout,
    children:[
      {
        meta:{
          title:'选择候选人',
          layoutName:'choseuser2',
        },
        name:'choseuser2',
        path:'',
        component:()=>
        import('@/views/choseuser2')
      },
    ],
  },{
    path:'/wtsbdetail',
    component:Layout,
    children:[
      {
        meta:{
          title:'问题上报详情',
          layoutName:'wtsbdetail',
        },
        name:'wtsbdetail',
        path:'',
        component:()=>
        import('@/views/wtsb/wtsbdetail')
      },
    ],
  },{
    path:'/jytgdetail',
    component:Layout,
    children:[
      {
        meta:{
          title:'经验推广详情',
          layoutName:'jytgdetail',
        },
        name:'jytgdetail',
        path:'',
        component:()=>
        import('@/views/jytg/jytgdetail')
      },
    ],
  },{
    path: '/dwdyyt/dwdyytTable',
    name: 'dwdyytTable',
    component: () =>
      import('@/views/dwdyyt/dwdyytTable')
  },
  {
    path: '/dwdyyt/dwdyytDetail',
    component: Layout,
    children: [
      {
        meta: {
          title: '党委第一议题详情',
          layoutName: 'dwdyytDetail',
        },
        name: 'dwdyytDetail',
        path: '',
        component: () =>
          import('@/views/dwdyyt/dwdyytDetail')
      },
    ],
  }, {
    path: '/dwdyyt/dwdyytDetailTZ',
    component: Layout,
    children: [
      {
        meta: {
          title: '党委第一议题台账详情',
          layoutName: 'dwdyytDetailTZ',
        },
        name: 'dwdyytDetailTZ',
        path: '',
        component: () =>
          import('@/views/dwdyyt/dwdyytDetailTZ')
      },
    ],
  }, {
    path: '/dwdyyt/dwdyytSubmit',
    component: Layout,
    children: [
      {
        meta: {
          title: '党委第一议题个提交',
          layoutName: 'dwdyytSubmit',
        },
        name: 'dwdyytSubmit',
        path: '',
        component: () =>
          import('@/views/dwdyyt/dwdyytSubmit')
      },
    ],
  },{
    path:'/zbjqxxzd/xxzdtabview',
    name:'xxzdtabview',
    component:()=>
    import('@/views/zbjqxxzd/xxzdtabview')
    
  },
  {
    path:'/xxzddetail',
    component:Layout,
    children:[
      {
        meta:{
          title:'学习重点详情',
          layoutName:'xxzddetail',
        },
        name:'xxzddetail',
        path:'',
        component:()=>
        import('@/views/xxzddetail')
      },
    ],
  },{
    path: '/xxzdtosubmit',
    component: Layout,
    children: [{
      meta: {
        title: '支部近期学习重点递交'
      },
      name: 'xxzdtosubmit',
      path: '',
      component: () =>
        import('@/components/xxzdtosubmit'),
    }]

  },{
    path: '/xxzdTZDetail',
    component: Layout,
    children: [{
      meta: {
        title: '支部近期学习重点台账详情'
      },
      name: 'xxzdtzdetail',
      path: '',
      component: () =>
        import('@/views/xxzdTZDetail'),
    }]

  },
  {
    path:'/fileview',
    component:Layout,
    children:[
      {
        meta:{
          title:'附件详情',
          layoutName:'fileview',
        },
        name:'fileview',
        path:'',
        component:()=>
        import('@/views/fileview')
      },
    ],
  }
  ,{
    path: '/zstabview',
    name: 'zstabview',
    component: () =>
      import('@/views/zstabview')
  },
  {
    path:'/zsdetailview',
    name:'zsdetailview',
    component:()=>
    import('@/views/zsdetailview')
    
  }, 
  {
    path: '/zstabview/wfqdDetailView',
    component: Layout,
    children: [
      {
        meta: {
          title: '我发起的任务.详情',
          layoutName: 'wfqdDetailView',
        },
        name: 'wfqdDetailView',
        path: '',
        component: () =>
          import('@/views/zstabview/wfqdDetailView')
      },
    ],
  },
  //以下为党建视频部分新增
  {
    path:'/djspdetail',
    name: 'djspdetail',
    component: () => import('@/views/djspdetail')
},{  //tab页
    path:'/djsptabview',
    name: 'djsptabview',
    component: () => import('@/views/djsptabview')
  },{
    path: '/zhuangwei',
    component: Layout,
    children: [{
      meta: {
        title: '装维入格调研'
      },
      name: 'zhuangwei',
      path: '',
      component: () =>
          import('@/views/zhuangwei'),
    }]
  },{
    path: '/genzhuang',
    component: Layout,
    children: [{
      meta: {
        title: '联合跟装活动'
      },
      name: 'genzhuang',
      path: '',
      component: () =>
          import('@/views/genzhuang'),
    }]
  },
];

export default new Router({
  routes: constantRouterMap,
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    } else {
      return {
        x: 0,
        y: 0
      }
    }
  }
})